package com.ytjj.qmyx.mall.model.response;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.ytjj.common.utils.TokenUtil;
import com.ytjj.qmyx.mall.model.PageButton;
import com.ytjj.qmyx.mall.model.ProductActivity;
import com.ytjj.qmyx.mall.model.ProductActivityImg;
import com.ytjj.qmyx.mall.model.ProductImg;
import com.ytjj.qmyx.mall.model.esmodel.ProductActivityEsDto;
import com.ytjj.qmyx.mall.model.esmodel.ProductEsDto;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 *
 * @version 1.0
 *
 */
@Data
public class SearchProductResponse {

    /**
     * 主键
     *
     * @mbg.generated
     */
    private Integer id;

    private String activityType;

    private BigDecimal activityMax;

    private BigDecimal activityMin;

    private String extra;

    private Integer columnId;

    private String productNo;

    private String productName;

    private String productImg;

    private String sceneImg;

    private String shrinkImg;

    private BigDecimal price;

    private Integer stock;

    private String descr;

    private Integer pv;

    private Byte status;

    private Integer sort;

    private BigDecimal originalPrice;

    private Integer commentSum;

    private Integer goodRatio;


    private String warehouse;

    private String warehouseName;


    private String warehouseRule;


    private Integer categoryId;


    private String volumeStr;


    private Integer volume;

    private Date createTime;

    private Date updateTime;

    private Integer auditStatus;

    private Integer bankerId;

    private BigDecimal rate;

    private String attributeJson;

    private Integer isCollect;

    private Integer sex;

    private String comsumerPower;

    private String ageStr;

    private String provinceJson;

    private String labelJson;

    private Integer recImgFlag;

    private Map<String,PageButton> pageButtonMap;

    private Integer isHide;

    private Integer isAdvert;

    private List<ProductImg> productImgList;

    private List<ProductActivityImg> productActivityImgList;

    public SearchProductResponse(){}
    public SearchProductResponse(ProductActivityEsDto productActivityEsDto){
        BeanUtils.copyProperties(productActivityEsDto,this);
        this.recImgFlag = 0;
    }
    public SearchProductResponse(ProductEsDto productEsDto){
        BeanUtils.copyProperties(productEsDto,this);
        this.recImgFlag = 0;
    }
}
